package org.dftproject.genesis.core.tasks;

import java.util.Properties;

public class LocalTask implements ITask {
	
	private final Properties properties;
	
	public LocalTask(Properties properties) {
		if (properties.getProperty("id") == null)
			throw new IllegalArgumentException("id must be specified");
		this.properties = properties;
	}

	public String getId() {
		return properties.getProperty("id");
	}
	
	public String getType() {
		return properties.getProperty("type");
	}
	
	public String getLabel() {
		return properties.getProperty("label");
	}

	public String getAttribute(String name) {
		return properties.getProperty(name);
	}

}
